package com.zlx.module_base.base_api.module;

import androidx.lifecycle.LiveData;

import com.zlx.module_base.base_api.res_data.AddVideoBean;
import com.zlx.module_base.base_api.res_data.BaseBean;
import com.zlx.module_base.base_api.res_data.CommentBean;
import com.zlx.module_base.base_api.res_data.DynamicOrderBody;
import com.zlx.module_base.base_api.res_data.GuessLikeVideoBody;
import com.zlx.module_base.base_api.res_data.HomeVideoBean;
import com.zlx.module_base.base_api.res_data.PurchaseVideoBean;
import com.zlx.module_base.base_api.res_data.ShortVideoBean;
import com.zlx.module_base.base_api.res_data.ShortVideoBody;
import com.zlx.module_base.base_api.res_data.ShortVideoCommentListBean;
import com.zlx.module_base.base_api.res_data.UploadBean;
import com.zlx.module_base.base_api.res_data.VideoBean;
import com.zlx.module_base.base_api.res_data.VideoChannel;
import com.zlx.module_base.base_api.res_data.VideoChannelBody;
import com.zlx.module_base.base_api.res_data.VideoCommentListBean;
import com.zlx.module_base.base_api.res_data.VideoPurchaseListBean;
import com.zlx.module_base.base_api.res_data.VideoWatchBean;
import com.zlx.module_network.bean.ApiResponse;

import okhttp3.MultipartBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface VideoApi {

    /**
     * 首页今日推荐
     *
     * @param token
     * @return
     */
    @GET("appapi/video/getHomeTodayRecommend")
    LiveData<ApiResponse<VideoBean>> getHomeTodayRecommend(
            @Header("token") String token,
            @Query("type1") String type1,
            @Query("p") String p,
            @Query("state") String state
    );

    /**
     * 上传
     *
     * @return
     * @file file
     */
    @POST("appapi/upload")
    LiveData<ApiResponse<UploadBean>> upload(
            @Body MultipartBody multipartBody
    );

    /**
     * 频道列表
     *
     * @return
     * @file file
     */
    @GET("appapi/video/getVideoChannel")
    LiveData<ApiResponse<VideoChannel>> getVideoChannel(
            @Header("token") String token
    );

    /**
     * 新增视频
     */
    @POST("appapi/video/addVideo")
    LiveData<ApiResponse<AddVideoBean>> addVideo(
            @Header("token") String token,
            @Body VideoChannelBody body
    );

    /**
     * 观影记录
     */
    @GET("appapi/video/getVideoWatch")
    LiveData<ApiResponse<VideoWatchBean>> getVideoWatch(
            @Header("token") String token,
            @Query("type1") String type1,
            @Query("p") String p
    );

    /**
     * 视频购买记录
     */
    @GET("appapi/video/getVideoPurchaseList")
    LiveData<ApiResponse<VideoPurchaseListBean>> getVideoPurchaseList(
            @Header("token") String token,
            @Query("p") String p
    );

    /**
     * 首页视频详情
     */
    @GET("appapi/video/getHomeVideo")
    LiveData<ApiResponse<HomeVideoBean>> getHomeVideo(
            @Header("token") String token,
            @Query("id") String id
    );

    /**
     * 短视频详情
     */
    @POST("appapi/video/getShortVideo")
    LiveData<ApiResponse<ShortVideoBean>> getShortVideo(
            @Header("token") String token,
            @Body ShortVideoBody shortVideoBody
    );

    /**
     * 视频评论
     */
    @POST("appapi/video/addComment")
    LiveData<ApiResponse<BaseBean>> addComment(
            @Header("token") String token,
            @Body CommentBean commentBean
    );

    /**
     * 猜你喜欢
     */
    @POST("appapi/video/getGuessLikeVideo")
    LiveData<ApiResponse<VideoBean>> getGuessLikeVideo(
            @Header("token") String token,
            @Body GuessLikeVideoBody guessLikeVideoBody
    );

    /**
     * 余额购买视频
     */
    @POST("appapi/video/purchaseVideo")
    LiveData<ApiResponse<BaseBean>> purchaseVideo(
            @Header("token") String token,
            @Body PurchaseVideoBean purchaseVideoBean
    );

    /**
     * 余额购买动态
     */
    @POST("appapi/dynamicOrder")
    LiveData<ApiResponse<BaseBean>> dynamicOrder(
            @Header("token") String token,
            @Body DynamicOrderBody dynamicOrderBody
    );

    /**
     * 短视频评论
     */
    @GET("appapi/video/getShortVideoCommentList")
    LiveData<ApiResponse<ShortVideoCommentListBean>> getShortVideoCommentList(
            @Header("token") String token,
            @Query("videoId") String videoId
    );

    /**
     * 获取长视频评论
     */
    @GET("appapi/video/getVideoCommentList")
    LiveData<ApiResponse<VideoCommentListBean>> getVideoCommentList(
            @Header("token") String token,
            @Query("videoId") String videoId,
            @Query("type") String type
    );

    /**
     * 同城视频 附近
     */
    @GET("appapi/video/getCityVideoList")
    LiveData<ApiResponse<VideoBean>> getCityVideoList(
            @Header("token") String token,
            @Query("state") String state,
            @Query("city") String city,
            @Query("p") String p,
            @Query("checkStatus") String checkStatus
    );


}
